<template>
	<el-drawer title="档案详情" v-model="visible" :size="600" destroy-on-close @closed="$emit('closed')">
		<el-container v-loading="loading">
			<el-main>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="档案标题" prop="title">{{form.title}}</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="档案编号" prop="sortName">{{form.codeNo}}</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="是否为实物" prop="isKind">
							<el-tag type="warning" effect="dark" v-if="form.isKind=='0'">电子</el-tag>
							<el-tag type="success" effect="dark" v-if="form.isKind=='1'">实物</el-tag>
							<el-tag type="info" effect="dark" v-if="form.isKind=='2'">并存</el-tag>

						</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="档案分类" prop="sortName">{{form.sortName}}</el-form-item>
					</el-col>
				</el-row>
				<el-form-item label="档案摘要" prop="subject">{{form.subject}}</el-form-item>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="库房编号" prop="roomCodeNo">{{form.roomNumber}}</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="档案架编号" prop="phone">{{form.frameCodeNo}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="上架时间" prop="frameTime">{{form.frameTime}}</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="上架状态" prop="frameStatus">
							<el-tag type="success" effect="dark" v-if="form.frameStatus=='0'">待上架</el-tag>
							<el-tag type="warning" effect="dark" v-if="form.frameStatus=='1'">已上架</el-tag>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="文件数量" prop="fileQuantity">{{form.fileQuantity}}/份</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="文件页数" prop="pages">{{form.pages}}/页</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="文件格式" prop="extName">{{form.extName}}</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="涉密等级" prop="classifiedLevelName">{{form.classifiedLevelName}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="保存年限" prop="storagePeriod">{{form.storagePeriod}}</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="建档时间" prop="beginTime">{{form.beginTime}}
						</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="到期处置" prop="disposalMethodName">{{form.disposalMethodName}}</el-form-item>
					</el-col>
				</el-row>
				<el-row :gutter="24">
					<el-col :lg="12">
						<el-form-item label="借阅权限" prop="borrowingFlag">
							<el-tag type="warning" effect="dark" v-if="form.borrowingFlag=='0'">不可借阅</el-tag>
							<el-tag type="success" effect="dark" v-if="form.borrowingFlag=='1'">可以借阅</el-tag>
						</el-form-item>
					</el-col>
					<el-col :lg="12">
						<el-form-item label="查询权限" prop="beginTime">
							<el-tag type="warning" effect="dark" v-if="form.queryFlag=='0'">不可查询</el-tag>
							<el-tag type="success" effect="dark" v-if="form.queryFlag=='1'">可以查询</el-tag>
						</el-form-item>
					</el-col>
				</el-row>
				<el-form-item label="备注说明" prop="remark">{{form.remark}}</el-form-item>
				<el-form-item label="档案附件" v-if="form.attachId!=''">
					<attach-menu :attachIds="form.attachId" :roleFlag="1" :preview="true"></attach-menu>
				</el-form-item>
				<el-footer style="text-align: center;">
					<el-button @click="visible=false">关闭</el-button>
				</el-footer>
			</el-main>
		</el-container>
	</el-drawer>
</template>
<script>


import AttachMenu from "@/views/module/attachMenu.vue";

export default {
	components: {AttachMenu},
	emits: ['success', 'closed'],
	data() {
		return {
			visible: false,
			isSaveing: false,
			loading:false,
			//所需数据选项
			form: {
				recordId:'',
				title:'',
				codeNo:'',
				isKind:'',
				sortName:'',
				subject:'',
				roomNumber: '',
				frameCodeNo:'',
				frameTime:'',
				frameStatus:'',
				fileQuantity:0,
				pages:0,
				extName:'',
				classifiedLevelName:'',
				storagePeriod:0,
				beginTime:'',
				disposalMethodName:'',
				borrowingFlag:'',
				queryFlag:'',
				remark:'',
				attachId:''
			}
		}
	},
	mounted() {
	},
	methods: {
		open() {
			this.visible = true;
			return this
		},
		setData(data) {
			this.form.recordId = data.recordId
			this.form.title = data.title
			this.form.codeNo = data.codeNo
			this.form.isKind = data.isKind
			this.form.sortName =data.sortName
			this.form.subject = data.subject
			this.form.roomNumber = data.roomNumber
			this.form.frameCodeNo = data.frameCodeNo
			this.form.frameTime = data.frameTime
			this.form.frameStatus = data.frameStatus
			this.form.fileQuantity = data.fileQuantity
			this.form.pages = data.pages
			this.form.extName = data.extName
			this.form.classifiedLevelName = data.classifiedLevelName
			this.form.disposalMethodName = data.disposalMethodName
			this.form.storagePeriod = data.storagePeriod
			this.form.beginTime = data.beginTime
			this.form.borrowingFlag = data.borrowingFlag
			this.form.queryFlag = data.queryFlag
			this.form.remark = data.remark
			this.form.attachId = data.attachId
		},
	}
}
</script>

<style>
.customWidth {
	width: 60%;
}
</style>
